Model your first test case

There are two types of test cases in TPT - step list test cases and time partition test cases. The latter is a more advanced kind of test case.

Step list modeling is the basic form for creating test cases.

Use step list modeling to create step list test cases.

Step list

A step list consists of one or more steps or actions. The steps are executed sequentially or even simultaneously.

To create a step list test case, right-click on the Test Cases folder in the Project view. Select Add test case (step list). Select the test case added.

Select 'Add Test Case (Step List)'

In the menu bar of the main window, select View|Show View|Content to open the Content view. Click Add step in the Content view toolbar or press F4 to display the different steps available. Select Channel [S] or press S to insert a Channel step.

Insert a 'Channel step'

Click in the first text field of the Channel step. Press Ctrl+Space to activate the autocompletion feature. In the drop-down list, the output channels specified in the Declaration Editor are displayed.

Select the channel light_switch.

Select a channel

The name of the channel can also be entered manually.

Place the cursor in the next empty field, and enter 1 as value. The signal preview shows the value of the selected channel.

To activate or deactivate the signal preview, click Show Signal Preview in the Content view toolbar.

First 'Channel step' and signal preview

Click Add step in the Content view toolbar or press F4 to display the different steps available. Select Compare [C] or press C to insert a Compare step.

Compare step

A Compare step checks if a condition is true during a specified time interval, for example, if light_switch == 1 then headlight == 1.

Click in the first text field of the Compare step. Press Ctrl+Space to activate the autocompletion feature. In the drop-down list, select headlight. Place the cursor in the next empty field, and enter 1 as value.

The autocompletion feature (shortcut Ctrl+Space) can be used to insert signal names. They can also be copied from the Declaration Editor (shortcut Ctrl+ ALT+C), see Declaration Editor.

Simple 'Compare step'